<template>
	<view class="cityContent">
		<view class="conlation">
			<view class="iconfont iconweibiaoti- conlation-left">
				当前位置：{{currentCity}}
			</view>
			<navigator open-type="navigate" url="/pages/changeCity/changeCity" class="conlation-right">
				切换<text class="iconfont iconBAI-qiehuan"></text>
			</navigator>
		</view>
		<view class="video-list">
			<view class="item" v-for="item in list" :key="item.id">
				<view class="video" @click="playerTo(list)">
					<video class="video-media" muted  :controls="false" :src="item.src"></video>
				</view>
				<view class="avatar">
					<image class="avatar-content" src="../static/image/portrait.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['currentCity'],
		data() {
			return {
				list:[{
					"id":2,
					"src":"http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400",
					"author":"李四",
					"title":"我爱学习",
					"loveNumber":124,
					"commentNumber":444,
					"shareNumber":321
				},{
					"id":3,
					"src":"http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400",
					"author":"王五",
					"title":"我爱学习",
					"loveNumber":125,
					"commentNumber":333,
					"shareNumber":310
				}]
			};
		},
		methods:{
			playerTo(list) {
				uni.setStorage({
					key: 'videoList',
					data: list
				})
				uni.navigateTo({
					url: '/pages/player/player'
				})
			}
		},
		created() {
			
		}
	}
</script>

<style lang="scss">
	.cityContent {
		box-sizing: border-box;
		width: 100%;
		padding: 4px;
		background-color: #000000;
		color: #ffffff;
		z-index: 18;
	}
	.conlation {
		box-sizing: border-box;
		width: 100%;
		height: 100%;
		margin-top: 70px;
		overflow: hidden;
		padding: 0 15px;
		display: flex;
		color: #aaaaaa;
		justify-content: space-between;
		font-size: 13px;

		.conlation-left {
			font-size: 15px;
		}

		.conlation-right {
			font-size: 15px;
		}
	}

	.video-list {
		width: 100%;
		overflow: auto;
		margin-top: 20px;
		.item {
			width: 50%;
			height: 300px;
			position: relative;
			float: left;
			display: flex;
			margin-bottom: 10px;
			justify-content: center;
			.video {
				width: 92%;
				height: 100%;
				background-color: #cccccc;
				.video-media {
					width: 100%;
					height: 100%;
					
				}
			}
			.avatar{
				position: absolute;
				bottom: 7px;
				right: 10px;
				.avatar-content{
					width: 25px;
					height: 25px;
					border-radius: 50%;
				}
			}

		}
	}
</style>
